css: Fix radial-gradient() color stop computation
authorBenjamin Otte <otte@redhat.com>
Wed, 2 Nov 2016 14:19:49 +0000 (15:19 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 2 Nov 2016 14:19:49 +0000 (15:19 +0100)
The copy/paste from the linear gradient code had an error.

gtk/gtkcssimageradial.c

index 81967c9a80c26f18beecabe72bb81987180dfbd3..4ae434403c3cbc50bc48d8bc4bed54cd5cf84e90 100644 (file)
@@ -197,7 +197,7 @@ gtk_css_image_radial_draw (GtkCssImage *image,
         pos = _gtk_css_number_value_get (stop->offset, radius) / radius;
 
       pos = MAX (pos, 0);
-      step = pos / (i - last);
+      step = (pos - offset) / (i - last);
       for (last = last + 1; last <= i; last++)
         {
           const GdkRGBA *rgba;